package com.pig.pojo.commgoods;

public class ImageVo {
    private Integer error;      //0表示文件上传正确     1文件上传有误
    private String url;         //图片浏览的网络地址/虚拟地址
    private Integer width;      //图片宽度
    private Integer height;     //图片高度

    public static ImageVo fail() {
        return new ImageVo(1,null,null,null);
    }

    public static ImageVo success(String url,Integer width,Integer height) {
        return new ImageVo(0,url, width, height);
    }

    public ImageVo() {
    }

    public ImageVo(Integer error, String url, Integer width, Integer height) {
        this.error = error;
        this.url = url;
        this.width = width;
        this.height = height;
    }

    public Integer getError() {
        return error;
    }

    public void setError(Integer error) {
        this.error = error;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getWidth() {
        return width;
    }

    public void setWidth(Integer width) {
        this.width = width;
    }

    public Integer getHeight() {
        return height;
    }

    public void setHeight(Integer height) {
        this.height = height;
    }
}
